package com.study.studyfive.test;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.Arrays;
import java.util.List;

/**
 * @author zhangwei
 * @version 1.0
 * @date 2023/9/18 14:28
 */
public class Demo {
    public static void main(String[] args) {
        //System.out.println("123456".substring(2));

       /* List<String> fileTypeList = Arrays.asList("application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                "application/pdf", "application/vnd.ms-powerpoint");

        String word = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";

        String ppt = "application/vnd.ms-powerpoint";

        if (fileTypeList.contains(word)){
            System.out.println("我是Word文档");
        }

        //fileTypeList.add("456");
        System.out.println(fileTypeList);*/

        System.out.println(File.separator);

        String  s = "/root/data/upload";
        String s1 = s.replace("/", "\\");
        System.out.println(s1);

        try {
            File file = new File("D:\\test\\123");
            if (!file.exists()) {
                file.mkdir();
            }

            FileOutputStream fileOutputStream = new FileOutputStream(file);

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }


    }
}
